package com.sparkflow.mysqlbinlog.clickhousesync.config.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * ClickHouse配置属性类
 * 管理ClickHouse数据库连接和同步参数配置
 *
 * @author Mr_xiaoZH
 * @date 2025-07-23
 */
@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "clickhouse")
public class ClickHouseProperties {
    
    private String url;
    private String user;
    private String password;
    
    private Connection connection = new Connection();

    @Getter
    @Setter
    public static class Connection {
        private int socketTimeout = 300000;
        private int connectionTimeout = 60000;
        private int maxExecutionTime = 60;
        private int maxThreads = 4;
        private int bufferSize = 65536;
        private boolean compress = true;
    }
    
}